Improving I/O consumption for TIFF-based formats#237
Merged
Conversation
…ed formats. This was blowing the IO budget for large images.
enricoribelli
approved these changes
May 30, 2023
linkyndy
approved these changes
May 30, 2023
Contributor
linkyndy
left a comment
There was a problem hiding this comment.
Looks great, thanks for syncing with the other library 💪
Just a small remark; feel free to move forward if you disagree with it.
| Measurometer.instrument('format_parser.exif_parser.exif_from_tiff_io') do | ||
| extended_io = IOExt.new(constrained_io) | ||
| exif_raw_data = EXIFR::TIFF.new(extended_io) | ||
| exif_raw_data = EXIFR::TIFF.new(extended_io, load_thumbnails: false) |
Contributor
There was a problem hiding this comment.
One question: could it be useful to provide this as a config for the library? I can imagine some might actually need those thumbnails.
Contributor
Author
There was a problem hiding this comment.
You mean via intrinsics? That is a good point. I'll change this.
On this: are the intrinssics something we want to maintaining stable across multiple versions?
Contributor
There was a problem hiding this comment.
Not necessarily, just a way to configure this when using the library.
On the intrinsics, I think it would be nice, though I wouldn't consider it as a priority.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All parsers for TIFF-based formats were loading embedded thumbnails alongside exif data, which was blowing the IO budget for large images.
This upgrades the dependency EXIFR that now allows us to skip this step.
(the actual work was done here)